package cn.rayland.library.bean;

import cn.rayland.app.yandktest.X3gStatus;
import cn.rayland.library.utils.ConvertUtils.ConvertCallback;

public class MachineTask<T> {

	protected String taskName;
	protected T content;
	protected TaskCallback taskCallback;
	protected ConvertCallback convertCallback;
	protected GcodeCallback gcodeCallback;
	
	
	public String getTaskName() {
		return taskName;
	}
	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}
	public TaskCallback getTaskCallback() {
		return taskCallback;
	}
	public void setTaskCallback(TaskCallback taskCallback) {
		this.taskCallback = taskCallback;
	}
	public ConvertCallback getConvertCallback() {
		return convertCallback;
	}
	public void setConvertCallback(ConvertCallback convertCallback) {
		this.convertCallback = convertCallback;
	}
	public GcodeCallback getGcodeCallback() {
		return gcodeCallback;
	}
	public void setGcodeCallback(GcodeCallback gcodeCallback) {
		this.gcodeCallback = gcodeCallback;
	}
	public T getContent() {
		return content;
	}
	public void setContent(T content) {
		this.content = content;
	}



	public interface TaskCallback {
		void onStart(MachineTask task, X3gStatus consume);
		void onError(MachineTask task, MachineState state);
		void onCancel(MachineTask task, MachineState state);
		void onFinished(MachineTask task, MachineState state);
	}
	
	public interface GcodeCallback {
		void onM900(float distance);
		void onM114(float[] positions);
	}
}
